package lab02.Test22;

public class test {
    public static void main(String[] args) {
        //给定一个字符串，将字符串中的大写字母变成小写字母
        //数字用0来代替，其他用#代替
        String result="Hello,2017,World";
        //StringBuffer stringBuffer=new StringBuffer();//可以输出整个字符串
        //StringBuilder stringBuilder=new StringBuilder();//可以直接输出整个字符串

        for (int i=0;i<result.length();i++){
            char tmp=result.charAt(i);
            if (tmp>='A'&&tmp<='Z'){
                //stringBuffer.append(tmp+32);
                System.out.print((char)(tmp+32));
            }else if(tmp>='a'&&tmp<='z'){
                // stringBuffer.append(tmp);
                System.out.print(tmp);
            }else if(tmp>='0'&&tmp<='9'){
                // stringBuffer.append("0");
                System.out.print("0");
            }else {
                //stringBuffer.append("#");
                System.out.print("#");
            }
        }
        //System.out.println(stringBuffer);
    }

}
